package com.tm.controller;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RequestMapping("student")
public class StuController {


    @RequestMapping("getById")
    public Student getById(Integer id){

        return new Student(1,"张三");
    }

}

@Data
@AllArgsConstructor
@NoArgsConstructor
class Student{
    private Integer id;
    private String name;
}